package func.study.jvm.c1;

/**
 * 虚拟机栈
 * VM args: -Xss128k
 * Created by chenyao on 2017/7/7.
 */
public class JavaVMStackSOF {

    private int stackLength = 1;

    public void stackLeak() {
        stackLength++;
        stackLeak();
    }
    public static void main(String[] args) {
        JavaVMStackSOF sof = new JavaVMStackSOF();
        try {
            sof.stackLeak();
        } catch (Throwable e) {
            //e.printStackTrace();
            System.out.println("stack length:" + sof.stackLength);
            throw e;
        }
    }



}
